{% extends 'base.html' %}
{% block title %}Invoice{% endblock %}
{% block stylesheet %}
{{ block.super }}

{% endblock%}

{% block javascript %}
{{ block.super }}
<script type="text/javascript" src="{% url base_static "js/jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
    $("#id_invoiced_date").datepicker({dateFormat: 'yy-mm-dd'});
    $("#id_due_date").datepicker({dateFormat: 'yy-mm-dd'});
    $("#id_start_date").datepicker({dateFormat: 'yy-mm-dd'});
    $("#id_end_date").datepicker({dateFormat: 'yy-mm-dd'});
    $("#id_pay_date").datepicker({dateFormat: 'yy-mm-dd'});

    $("form table tr:even").addClass("even");
});
//]]>
</script>
{% endblock%}

{% block content %}
<div id="navi">
    <ul>
        <li>
        <a href="{% url invoice_year_list "2011" %}">2011 Invoice list</a>
        </li>
    </ul>
</div>

{% if msg %}
    {{ msg }}
{% else %}
<form action="" method="post">
    <table class="form">
    {{ form.as_table }}
    </table>
    <input type="submit" value="submit">
</form>
{% endif %}
{% endblock %}